home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Software Contest 3
/
FM Towns Software Contest 3.iso
/
exp
/
video_t
/
no1
/
c_sorse
/
snd2.c
< prev
next >
Wrap
Text File
|
1994-01-07
|
3KB
|
102 lines
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <winb.h>
#include <te.h>
#include <fntb.h>
#include <gui.h>
int Dialog_snd = -1 ;
int Message_snd = -1 ;
int DButton_snd = -1 ;
int _002Message_snd = -1 ;
int _001Message_snd = -1 ;
int DButton_snd2 = -1 ;
int _001DButton_snd2 = -1 ;
int _003Message_snd = -1 ;
int _004Message_snd = -1 ;
int Text_snd = -1 ;
int NumBox_snd = -1 ;
extern int backid ;
extern int Dia_edit ;
extern int Dialog_menu ;
extern int Text ;
/* initDataSND:DButton_snd:MJ_DBUTTONL40の呼び出し関数 */
int s_fail(kobj, messId, argc, pev, trigger)
int kobj ;
int messId ;
int argc ;
EVENT *pev ;
int trigger ;
{
snd_fail();
return NOERR ;
}
/* initDataSND:DButton_snd2:MJ_DBUTTONL40の呼び出し関数 */
int snd_on(kobj, messId, argc, pev, trigger)
int kobj ;
int messId ;
int argc ;
EVENT *pev ;
int trigger ;
{
char pathname[300];
char pathname2[300]="/LOAD S ";
int sno,min, max, delta, ptColum ;
char suu[10];
MMI_SendMessage(NumBox_snd, MM_GETNUMBOX, 5,
&sno, &min, &max, &delta, &ptColum) ;
MMI_SendMessage(Text_snd, MM_GETTEXT, 3,pathname,300,0) ;
strcat(pathname2,pathname);
strcat(pathname2," ");
_itoa(sno,suu,10);
strcat(pathname2,suu);
MMI_SendMessage(Text,MM_SETTEXT,3,pathname2,200,TRUE) ;
MMI_SendMessage(Text,MM_SETTEXT,3,"\n",5,TRUE) ;
MMI_SendMessage(Text, MM_ERASE, 0) ;
MMI_SendMessage(Text, MM_WAKE, 0) ;
MMI_SendMessage(Text, MM_SHOW, 0) ;
MMI_SendMessage(Dialog_snd,MM_ERASE,0) ;
MMI_SendMessage(Dialog_snd,MM_DETACH,0) ;
/* メニューを選択可とします。 */
MTL_resetAtrObj(Dialog_menu, ~MS_DSPONLYL40) ;
MTL_resetAtrObj(Dia_edit, ~MS_DSPONLYL40) ;
MTL_resetAtrObj(backid, ~MS_DSPONLYL40) ;
return NOERR ;
}
/* initDataSND:_001DButton_snd2:MJ_DBUTTONL40の呼び出し関数 */
int snd_off(kobj, messId, argc, pev, trigger)
int kobj ;
int messId ;
int argc ;
EVENT *pev ;
int trigger ;
{
MMI_SendMessage(Dialog_snd,MM_ERASE,0) ;
MMI_SendMessage(Dialog_snd,MM_DETACH,0) ;
/* メニューを選択可とします。 */
MTL_resetAtrObj(Dialog_menu, ~MS_DSPONLYL40) ;
MTL_resetAtrObj(Dia_edit, ~MS_DSPONLYL40) ;
MTL_resetAtrObj(backid, ~MS_DSPONLYL40) ;
return NOERR ;
}
int l_snd()
{
/* 背景を選択不可とします。*/
MTL_setAtrObj(backid, MS_DSPONLYL40) ;
MTL_setAtrObj(Dialog_menu, MS_DSPONLYL40) ;
MTL_setAtrObj(Dia_edit, MS_DSPONLYL40) ;
MMI_SendMessage(Dialog_snd,MM_ATTACH,1,MMI_GetBaseObj()) ;
MMI_SendMessage(Dialog_snd, MM_SHOW, 0) ;
return NOERR ;
}